package cn.com.cifi.mars.entity.common;

import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;

import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author yyd
 * @since 2019-09-18
 */
@Data
@TableName("t_sys_permission")
public class SysPermission implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value = "id", type = IdType.INPUT)
    private String id;
    
    /**
     * 权限编码
     */
    @TableField("per_code")
    private String perCode;

    /**
     * 权限名称
     */
    @TableField("per_name")
    private String perName;

    /**
     * 权限类型 1--菜单级、2--页面元素级、3--功能操作级
     */
    @TableField("per_type")
    private String perType;

    /**
     * 权限菜单
     */
    @TableField("per_menu")
    private String perMenu;

    /**
     * 权限标签
     */
    @TableField("per_tab")
    private String perTab;

    /**
     * 权限按钮
     */
    @TableField("per_button")
    private String perButton;

    /**
     * 权限链接
     */
    @TableField("per_link")
    private String perLink;

    /**
     * 权限事件
     */
    @TableField("per_event")
    private String perEvent;

    /**
     * 权限路径
     */
    @TableField("per_url")
    private String perUrl;

    /**
     * 权限图标
     */
    @TableField("per_icon")
    private String perIcon;

    /**
     * 是否有效 0--有效、1--无效
     */
    @TableField("is_vaild")
    private String isVaild;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    @TableField("createby")
    private String createby;

    /**
     * 父权限编码
     */
    @TableField("parent_code")
    private String parentCode;
    
    /**
     * 路由名称
     */
    @TableField("route_name")
    private String routeName;
    
    
	/**
	 * 子节点
	 */
    @TableField(exist = false)
	private List<SysPermission> childMenu;

    public String getRouteName() {
		return routeName;
	}

	public List<SysPermission> getChildMenu() {
		return childMenu;
	}

	public void setChildMenu(List<SysPermission> childMenu) {
		this.childMenu = childMenu;
	}

	public void setRouteName(String routeName) {
		this.routeName = routeName;
	}

	public Integer getRouteId() {
		return routeId;
	}

	public void setRouteId(Integer routeId) {
		this.routeId = routeId;
	}

	public String getItsApplicationCode() {
		return itsApplicationCode;
	}

	public void setItsApplicationCode(String itsApplicationCode) {
		this.itsApplicationCode = itsApplicationCode;
	}

	public String getItsApplicationName() {
		return itsApplicationName;
	}

	public void setItsApplicationName(String itsApplicationName) {
		this.itsApplicationName = itsApplicationName;
	}

	/**
     * 路由id
     */
    @TableField("route_id")
    private Integer routeId;
    
    /**
     * 排序
     */
    private Integer sort;

    public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	/**
     * 所属应用code
     */
    @TableField("its_application_code")
    private String itsApplicationCode;

    /**
     * 所属应用名称
     */
    @TableField("its_application_name")
    private String itsApplicationName;

    public String getPerCode() {
        return perCode;
    }

    public void setPerCode(String perCode) {
        this.perCode = perCode;
    }
    public String getPerName() {
        return perName;
    }

    public void setPerName(String perName) {
        this.perName = perName;
    }
    public String getPerType() {
        return perType;
    }

    public void setPerType(String perType) {
        this.perType = perType;
    }
    public String getPerMenu() {
        return perMenu;
    }

    public void setPerMenu(String perMenu) {
        this.perMenu = perMenu;
    }
    public String getPerTab() {
        return perTab;
    }

    public void setPerTab(String perTab) {
        this.perTab = perTab;
    }
    public String getPerButton() {
        return perButton;
    }

    public void setPerButton(String perButton) {
        this.perButton = perButton;
    }
    public String getPerLink() {
        return perLink;
    }

    public void setPerLink(String perLink) {
        this.perLink = perLink;
    }
    public String getPerEvent() {
        return perEvent;
    }

    public void setPerEvent(String perEvent) {
        this.perEvent = perEvent;
    }
    public String getPerUrl() {
        return perUrl;
    }

    public void setPerUrl(String perUrl) {
        this.perUrl = perUrl;
    }
    public String getPerIcon() {
        return perIcon;
    }

    public void setPerIcon(String perIcon) {
        this.perIcon = perIcon;
    }
    public String getIsVaild() {
        return isVaild;
    }

    public void setIsVaild(String isVaild) {
        this.isVaild = isVaild;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public String getCreateby() {
        return createby;
    }

    public void setCreateby(String createby) {
        this.createby = createby;
    }
    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    @Override
    public String toString() {
        return "SysPermission{" +
        "perCode=" + perCode +
        ", perName=" + perName +
        ", perType=" + perType +
        ", perMenu=" + perMenu +
        ", perTab=" + perTab +
        ", perButton=" + perButton +
        ", perLink=" + perLink +
        ", perEvent=" + perEvent +
        ", perUrl=" + perUrl +
        ", perIcon=" + perIcon +
        ", isVaild=" + isVaild +
        ", createTime=" + createTime +
        ", createby=" + createby +
        ", parentCode=" + parentCode +
        "}";
    }
}
